The present invention relates to a method and/or architecture for selecting clock modes generally and, more particularly, to a method and/or architecture for automatically selecting clock modes.
Conventional universal serial bus (USB) microcontroller chips include an externally-based oscillator to provide an accurate clock for timing internal operations. The externally-based oscillators typically consist of a high-value resistance and an external timing component (i.e., a crystal or ceramic resonator) connected between an input and an output of an inverting amplifier. A growing number of microcontroller chips have an internal oscillator that can provide an accurate clock with no external timing component.
The option to operate from either an internal or external-based clock normally requires user firmware to explicitly select between the two clock sources. The firmware requirement can require that separate code be generated in order to work with both varieties of microcontrollers. The generation of separate code can include qualification overhead.
If an internal clock mode is added to a cost-reduction version of a chip, the internal clock cannot be readily implemented without changing the firmware. A change in the firmware can require burdensome intervention by the developer to change and qualify the new firmware. The additional firmware development burden can reduce the attractiveness of adding an internal clock mode to a cost-reduction chip.
A solution that allows chips supporting both internal and external-based clock oscillators to automatically select the clock source based on connections at the clock input would be desirable.
The present invention concerns an apparatus comprising a circuit configured to automatically select a clock mode in response to a state of a clock input.
The objects, features and advantages of the present invention include providing a method and/or architecture for automatically selecting clock modes that may (i) require no firmware changes to switch between internal-based and external-based clock modes, (ii) select a clock mode automatically, based on the presence or absence of an external timing element, (iii) select between internal-based and external-based clock modes without firmware intervention, (iv) use the signal characteristics at an oscillator pin to determine the connected devices and the desired clock mode, (v) select a clock mode at power-up, (vi) provide fault-tolerance to failure of an external timing component, (vii) provide an indication of the clock mode that is operating, and/or (viii) select an internal clock when a clock input is grounded.